package routers

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func LoadGroup(engine *gin.Engine) {
	v1 := engine.Group("/v1")
	{
		v1.GET("/login", loginEndpoint)
		v1.GET("/submit", submitEndpoint)
	}
	v2 := engine.Group("v2")
	{
		v2.GET("/login", loginEndpoint)
		v2.GET("/submit", submitEndpoint)
	}
	engine.LoadHTMLGlob("templates/*.html")
	engine.Any("/", func(ctx *gin.Context) {
		ctx.String(http.StatusOK, "Hello Gin")
	})
}
